package org.wu.framework.easy.upsert;


import org.wu.framework.core.annotation.AliasFor;
import org.wu.framework.easy.upsert.autoconfigure.dynamic.EasyUpsert;
import org.wu.framework.easy.upsert.autoconfigure.enums.EasyUpsertType;
import org.wu.framework.lazy.orm.core.stereotype.LazyDS;

import java.lang.annotation.*;

/**
 * 切换MySQL数据源
 *
 * @author : Jia wei Wu
 * @version : 1.0
 * @date : 2021/7/4 7:37 下午
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented

@EasyUpsert(type = EasyUpsertType.MySQL)
@LazyDS
public @interface EasyUpsertMySQL {
    /**
     * 数据源名称(MYSQL多数据源有效)
     *
     * @return
     */
    @AliasFor(attribute = "name", annotation = LazyDS.class)
    String value() default "";

    @AliasFor(attribute = "value", annotation = LazyDS.class)
    String name() default "";
}
